package com.nativetalk.dao;

import com.nativetalk.bean.FoundChange.TdNtMembFoundChangeInset;
import com.nativetalk.bean.FoundChange.TdNtMembFoundChangeList;
import com.nativetalk.bean.FoundChange.TdNtMembFoundChangeUpdate;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by lizhun on 15/12/23.
 */
@MyBatisRepository
public interface TdNtMembFoundChangeDao {
    /**
     * @Purpose  添加用户资金变动记录
     * @version  1.0
     * @author   lizhun
     * @param    tdNtMembFoundChangeInset
     * @return   void
     */
    public void insertTdNtMembFoundChange(TdNtMembFoundChangeInset tdNtMembFoundChangeInset);
    /**
     * @Purpose  查找用户资金变动记录数量
     * @version  1.0
     * @author   lizhun
     * @param    memb_id
     * @return   int
     */
    public int findTdNtMembFoundChangeSize(Integer memb_id);
    /**
     * @Purpose  查找用户资金变动记录分页
     * @version  1.0
     * @author   lizhun
     * @param    map
     * @return   List<TdNtMembFoundChangeList>
     */
    public List<TdNtMembFoundChangeList> findTdNtMembFoundChangePage(Map<String,Object> map);
    /**
     * @Purpose  查找资金变化记录用于更新
     * @version  1.0
     * @author   lizhun
     * @param    mfchg_number
     * @return   TdNtMembFoundChangeUpdate
     */
    public TdNtMembFoundChangeUpdate findTdNtMembFoundChangeUpdate(String mfchg_number);
    /**
     * @Purpose  更新资金变化记录
     * @version  1.0
     * @author   lizhun
     * @param    tdNtMembFoundChangeUpdate
     * @return   void
     */
    public void updateTdNtMembFoundChange(TdNtMembFoundChangeUpdate tdNtMembFoundChangeUpdate);
    /**
     * @Purpose  查找资金变化记录用于确认支付是否成功
     * @version  1.0
     * @author   lizhun
     * @param    mfchg_number
     * @return   TdNtMembFoundChangeUpdate
     */
    public TdNtMembFoundChangeUpdate findTdNtMembFoundChangeBack(String mfchg_number);
    /**
     * @Purpose  查找用户是否领取注册奖励
     * @version  1.0
     * @author   lizhun
     * @param    map
     * @return   TdNtMembFoundChangeList
     */
    public TdNtMembFoundChangeList findMemberByRegister(Map<String, Object> map);


    /**
     * 更新支付状态
     *
     * @param orderNo
     * @param paymentState
     */
    public void updatePaymentState(@Param("orderNo") String orderNo, @Param("paymentState") String paymentState);

    /**
     * 根据订单编号查询资金变化记录
     *
     * @param orderNo
     * @return
     */
    public TdNtMembFoundChangeInset findTdNtMembFoundChangeByOrderNo(@Param("orderNo") String orderNo);

    /**
     * 根据订单号补全订单号的信息
     * @param tdNtMembFoundChangeInset
     */
    public void updatePaymentInfo(TdNtMembFoundChangeInset tdNtMembFoundChangeInset);
}
